using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace GoogleCalendarReminder.gui
{
    /// <summary>
    /// A form which allows a user to enter credentials.
    /// </summary>
    public partial class CredentialForm : Form
    {
        #region Private Data Members

        private Size _size = new Size(317, 185);

        #endregion

        #region Protected Functions

        /// <summary>
        /// Sets focus on the username text box when the form is shown.
        /// </summary>
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);
            txtUsername.Focus();
        }

        #endregion

        #region Constructors

        /// <summary>
        /// Creates a new isntance of the GoogleCalendarReminder.gui.CredentialForm class.
        /// </summary>
        public CredentialForm()
        {
            InitializeComponent();
            base.Size = _size;
        }

        #endregion

        #region Public Properties

        /// <summary>
        /// Gets the password.
        /// </summary>
        public string Password
        {
            get { return txtPassword.Text; }
        }

        /// <summary>
        /// Gets the username.
        /// </summary>
        public string Username
        {
            get { return txtUsername.Text; }
        }

        #endregion
    }
}